package com.ruoyi.web.controller.buy;

import com.ruoyi.buy.domain.entity.PO.BuyUserBrand;
import com.ruoyi.buy.domain.entity.buy0011.Buy0011TableData;
import com.ruoyi.buy.service.IBuy0011Service;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 角色信息
 * 
 * @author ruoyi
 */
@RestController
@Transactional(rollbackFor = Exception.class)
@RequestMapping("/buy/buy0011")
public class buy0011Controller extends BaseController {
    @Autowired
    private IBuy0011Service buy0011Service;


    /**
     * 查询库存信息列表
     */
    @GetMapping("/list")
    public TableDataInfo list(Buy0011TableData para)
    {
        startPage();
        List<Buy0011TableData> list = buy0011Service.getList(para);
        return getDataTable(list);
    }


    /**
     * 获取【请填写功能名称】详细信息
     */
    @GetMapping(value = "/getOprInfo")
    public AjaxResult getOprInfo()
    {
        return AjaxResult.success(buy0011Service.getOprWithRole());
    }

    @PostMapping(value = "/save")
    public AjaxResult save(@RequestBody Buy0011TableData para)
    {
        this.buy0011Service.save(para);
        return AjaxResult.success("操作成功");
    }
}
